﻿@model SitemapModel
@using Nop.Web.Models.Catalog;
@using Nop.Web.Models.Common;
@using Nop.Web.Models.Topics;
@{
    Layout = "~/Views/Shared/_Root.cshtml";

    //title
    Html.AddTitleParts(T("PageTitle.Sitemap").Text);
}
<div class="page sitemap-page">
    <div class="page-title">
        <h1>@T("Sitemap")</h1>
    </div>
    <div class="page-body">
        @if (Model.Topics.Count > 0)
        {
            <div class="entity">
                @foreach (var item in Model.Topics)
                {
                    <div class="topic-box">
                        <div class="item">
                            <a href="@Url.RouteUrl("Topic", new { SystemName = item.SystemName.ToLowerInvariant() })">@item.Title</a>
                        </div>
                    </div>
                }
            </div>
        }
        @if (Model.Categories.Count > 0)
        {
            <div class="entity">
                <h2>
                    @T("Sitemap.Categories")</h2>
                @foreach (var item in Model.Categories)
                {
                    <div class="category-box">
                        <div class="item">
                            <a href="@Url.RouteUrl("Category", new { SeName = item.SeName })">@item.Name</a>
                        </div>
                    </div>
                }
            </div>
        }
        @if (Model.Manufacturers.Count > 0)
        {
            <div class="entity">
                <h2>
                    @T("Sitemap.Manufacturers")</h2>
                @foreach (var item in Model.Manufacturers)
                {
                    <div class="manufacturer-box">
                        <div class="item">
                            <a href="@Url.RouteUrl("Manufacturer", new { SeName = item.SeName })">@item.Name</a>
                        </div>
                    </div>
                }
            </div>
        }
        @if (Model.Products.Count > 0)
        {
            <div class="entity">
                <h2>
                    @T("Sitemap.Products")</h2>
                @foreach (var item in Model.Products)
                {
                    <div class="product-box">
                        <div class="item">
                            <a href="@Url.RouteUrl("Product", new { SeName = item.SeName })">@item.Name</a>
                        </div>
                    </div>
                }
            </div>
        }
    </div>
</div>
